Skip to content

feat(store): namespace settings by scope and domain - #2456

Open
sofiazcoaga wants to merge 2 commits into
0xMiden:nextfrom
sofiazcoaga:add-domain-to-settings
Open

feat(store): namespace settings by scope and domain#2456
sofiazcoaga wants to merge 2 commits into
0xMiden:nextfrom
sofiazcoaga:add-domain-to-settings

Conversation

@sofiazcoaga

Copy link
Copy Markdown

Motivation

The settings table had one flat keyspace shared by the client and its users, so client.set_setting() let a user overwrite the client's own state with no error. Also, list_setting_keys() returned the client's internal keys to the caller.

Changes

This PR adds a scope and a domain to the settings table, with (scope, domain, name) as the primary key. SettingDomain::new() is public and always builds a user domain. The client's own domains cannot be built from outside the crate.

Existing stores are not compatible and must be recreated.

Closes #1352.

@sofiazcoaga
sofiazcoaga force-pushed the add-domain-to-settings branch from b29cd3c to 08b7848 Compare August 27, 2026 13:58
@juan518munoz juan518munoz added the no migration check This PR does not require the SQL migrations append-only check label Aug 31, 2026

@juan518munoz juan518munoz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Don't forget to add a changelog entry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no migration check This PR does not require the SQL migrations append-only check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add namespace or domain to settings

2 participants